#ifndef TASKREQUESTSIGNALSPY_H
#define TASKREQUESTSIGNALSPY_H

#include <QObject>
#include <QString>
#include <QByteArray>
#include "tasks/taskrequest.h"
#include "tasks/taskboardrequest.h"
#include "tasks/taskthreadrequest.h"
#include "tasks/taskattachmentrequest.h"

namespace Wishmaster {
class TaskRequestSignalSpy : public QObject
{
	Q_OBJECT
public:
	explicit TaskRequestSignalSpy(QObject *parent = 0);

	void emitSignalResult(const RequestPtr& rq, const QByteArray& arr);

	int taskBoardRequestCalls() const;
	int taskThreadRequestCalls() const;
	int taskAttachmentRequestCalls() const;

signals:
	void signal_result(const RequestPtr& rq, const QByteArray& arr);

public slots:
	void result(TaskBoardRequest* task, const QByteArray& arr, const QString& contentType);
	void result(TaskThreadRequest* task, const QByteArray& arr, const QString& contentType);
	void result(TaskAttachmentRequest* task, const QByteArray& arr, const QString& contentType);

private:
	int m_taskBoardRequestCalls;
	int m_taskThreadRequestCalls;
	int m_taskAttachmentRequestCalls;

};
}

#endif // TASKREQUESTSIGNALSPY_H
